package com.eistert.java.algorithm.dijkstra;

import java.util.Arrays;

/**
 * @Description: ͼ��
 * @Author: ai
 * @create: 2023-04-26 10:52
 */
public class Graph {

    public static final int INF = 65535; // ��ʾ����������

    // ��������
    private char[] vertex;

    // ��Ӿ���
    private int[][] matrix;

    // �Ѿ����ʵĶ���ļ���
    private VisitedVertex vv;

    // ������
    public Graph(char[] vertex, int[][] matrix) {
        this.vertex = vertex;
        this.matrix = matrix;
    }

    // ��ʾ���
    public void showDijkstra() {
        vv.show();
    }

    /**
     * ��ʾͼ
     */
    public void showGraph() {
        for (int[] link : matrix) {
            System.out.println(Arrays.toString(link));
        }
    }


    /**
     * �Ͻ�˹�����㷨ʵ��
     *
     * @param index ��ʾ���������Ӧ���±�
     */
    public void dijkstra(int index) {
        vv = new VisitedVertex(vertex.length, index);

    }

}
